ScaleHeight
Scales the height of the figure using the specified coefficient.
Syntax
expression.ScaleHeight(coefficient);
expression
- A variable that represents a ApiDrawing class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
coefficient | Required | number | The coefficient by which the figure height will be scaled. |
Returns
boolean
Example
This example scales the height of the figure using the specified coefficient.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
for (let i = 3; i > 0; i--) {
let fill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
let stroke = Api.CreateStroke(0, Api.CreateNoFill());
let drawing = Api.CreateShape("cube", 3212465, 963295, fill, stroke);
paragraph.AddDrawing(drawing);
drawing.ScaleHeight(i);
}